#include "Anthill.h"
#include <iostream>
#include "ItemCreator.h"
#include "Environment.h"

CAnthill::CAnthill(const unsigned int in_uiFoodCount) : m_uiFoodCount(in_uiFoodCount)
{
	
}


CAnthill::~CAnthill(void)
{
}

void CAnthill::act(int id)
{
	while(m_uiFoodCount>=10)
	{
		CItemCreator* pItemCreator=CItemCreator::Instance();
		CEnvironment* pEnvironment=CEnvironment::Instance();
		CArea* pArea=GetPosition();
		pEnvironment->InsertItem(pArea,pItemCreator->CreateAnt());
		m_uiFoodCount-=10;
	}

	std::cout << "Anthill acting" << std::endl;

}
